import javax.swing.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

public class AboutUS extends JPanel {
    AboutUS(JFrame jFrame, final JPanel launchPage){
        this.setLayout(null);
        final JPanel roleSelection = this;

        JLabel back = new JLabel();
        back.setIcon(new ImageIcon(Images.back));
        back.setBounds(50,30,50,50);
        this.add(back);


        JLabel Launchpage_background = new JLabel();
        Launchpage_background.setIcon(new ImageIcon(Images.aboutUS_background));
        Launchpage_background.setBounds(0,-20,1000,666);
        this.add(Launchpage_background);

        back.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                super.mouseClicked(e);
                roleSelection.setVisible(false);
                launchPage.setVisible(true);
            }

            @Override
            public void mouseEntered(MouseEvent e) {
                super.mouseEntered(e);
            }

            @Override
            public void mouseExited(MouseEvent e) {
                super.mouseExited(e);
            }
        });

    }
    public static void main(String[] args) {
//        JFrame jFrame = new JFrame();
//        RoleSelection playGame = new RoleSelection(jFrame);
//        jFrame.add(playGame);
//        jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//        jFrame.setSize(1000, 666);
//        jFrame.setLocationRelativeTo(null);
//        jFrame.setVisible(true);
    }
}
